---
title: TaskGroups.Add Method (Project)
ms.prod: project-server
api_name:
- Project.TaskGroups.Add
ms.assetid: e64d55db-6adc-5a6f-5b60-cd99bc1ab82a
ms.date: 06/08/2017
---


# TaskGroups.Add Method (Project)

Adds a  **Group** object to a **TaskGroups** collection.


## Syntax

 _expression_. **Add**( ** _Name_**, ** _FieldName_** )

 _expression_ A variable that represents a **TaskGroups** object.


### Parameters



|**Name**|**Required/Optional**|**Data Type**|**Description**|
|:-----|:-----|:-----|:-----|
| _Name_|Required|**String**| The name of a group definition.|
| _FieldName_|Required|**String**|The name of the first field to group by.|

### Return Value

 **Group**


